import os

dir = r'/Data\2025_data_cleaned/origin'
cnt = 0
for file_name in os.listdir(dir):
    old_path = os.path.join(dir, file_name)
    if os.path.isfile(old_path):
        new_name = f"{cnt:04d}.mp4"  # 假设文件扩展名为.mp4，根据实际情况修改
        new_path = os.path.join(dir, new_name)  # 使用原目录路径
        os.rename(old_path, new_path)
        print(f"Renamed: {file_name} -> {new_name}")
        cnt += 1